package guowenlong.golf.ui.dynamic.notify;

import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import guowenlong.golf.R;
import java.util.List;

/**
 * des   : 描述
 * author: Administrator
 * email : guowenlong20000@gmail.com
 * time  : 2017年03月31日 上午 12:55.
 */

public class NotifyAdapter extends BaseAdapter {

  private List<String> lists;

  public NotifyAdapter(List<String> lists) {
    this.lists = lists;
  }

  @Override
  public int getCount() {
    return lists.size();
  }

  @Override
  public Object getItem(int position) {
    return null;
  }

  @Override
  public long getItemId(int position) {
    return 0;
  }

  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
    if (convertView == null) {
      convertView = View.inflate(parent.getContext(), R.layout.item_notify, null);
    }
    TextView tv = (TextView) convertView.findViewById(R.id.item_tv_notify);
    tv.setText(lists.get(position));
    return convertView;
  }
}
